package com.jiangruan.javaproject.service;/**
 * @author:xulonghua
 * @email:3162193565@qq.com
 * desc:获取指定哈希区块头
 * datatime 2021/12/15 9:55
 */

import com.alibaba.fastjson.JSONObject;
import com.jiangruan.javaproject.Constants;
import com.jiangruan.javaproject.bean.Getblockheader;

/**
 *@author:xulonghua
 *@email:3162193565@qq.com
 *desc:
 *datetime 2021/12/15 9:55
 */
public class GetBlockHeader {
    public Getblockheader getblockheader(int id ,String HeaderHash,boolean Format){
        String result = UtilCommon.utilcommon ( id,  Constants.GetBlockHeader,HeaderHash, Format );
        //json解析
        Getblockheader getblockheader = JSONObject.parseObject ( result, Getblockheader.class );
        return  getblockheader;

    }
}
